//
//  PkViewController.h
//  CardWarrior
//
//  Created by Tekka Xie on 12-4-26.
//  Copyright (c) 2012年 Tencent. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface PkViewController : UIViewController
{
    UIImageView* hostCardEffect[4];
    UIImageView* guestCardEffect[4];
    UIImageView* hostHandCard[4];
    UIImageView* guestHandCard[4];
    BOOL hostHandCardValid[4];
    BOOL guestHandCardValid[4];
    BOOL currentCardValid;
    BOOL endBGMHasBegan;
}

@property(strong, nonatomic) IBOutlet UIImageView*  background02;
@property(strong, nonatomic) IBOutlet UIImageView*  hostRoleView;
@property(strong, nonatomic) IBOutlet UIImageView*  guestRoleView;
@property(strong, nonatomic) IBOutlet UIImageView*  blackRoundView;
@property(strong, nonatomic) IBOutlet UIImageView*  whiteRoundView;
@property(strong, nonatomic) IBOutlet UIImageView*  bannerView;
@property(strong, nonatomic) IBOutlet UIImageView*  hostScoreView;
@property(strong, nonatomic) IBOutlet UIImageView*  guestScoreView;
@property(strong, nonatomic) IBOutlet UIImageView*  hostNameView;
@property(strong, nonatomic) IBOutlet UIImageView*  guestNameView;
@property(strong, nonatomic) IBOutlet UIImageView*  hostCardStack;
@property(strong, nonatomic) IBOutlet UIImageView*  guestCardStack;
@property(strong, nonatomic) IBOutlet UIImageView*  hostDrawCard01;
@property(strong, nonatomic) IBOutlet UIImageView*  guestDrawCard01;
@property(strong, nonatomic) IBOutlet UIImageView*  hostTargetCard;
@property(strong, nonatomic) IBOutlet UIImageView*  guestTargetCard;
@property(strong, nonatomic) IBOutlet UIImageView*  hostTargetCardEffect;
@property(strong, nonatomic) IBOutlet UIImageView*  guestTargetCardEffect;
@property(strong, nonatomic) IBOutlet UIImageView*  hostAcceptView;
@property(strong, nonatomic) IBOutlet UIImageView*  guestAcceptView;
@property(strong, nonatomic) IBOutlet UIImageView*  pauseBtn;
@property(strong, nonatomic) IBOutlet UIImageView*  maskView;
@property(strong, nonatomic) IBOutlet UIImageView*  backBtn;
@property(strong, nonatomic) IBOutlet UIImageView*  playAgainBtn;
@property(strong, nonatomic) IBOutlet UIImageView*  backToMenuBtn;
@property(strong, nonatomic) IBOutlet UIImageView*  selectCharacterBtn;
          
- (void)setRoleView;
- (void)initReset;
- (void)initAllViews;
- (void)initGlobalBlock;
- (void)setScoreView;
- (void)setNameView;
- (void)drawTargetCard;
- (void)setHandCardView;
- (void)showHiddenMenu;
- (void)clearAllData;

- (void)drawAndGetImage:(UIImageView*)view drawHost:(BOOL)isDrawHost;
- (void)switchCardStackStatus;

// aniamation delegate
- (void)animationWillStart:(NSString *)animationID context:(void *)context;
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context;

// timer
- (void)timerFireMethod:(NSTimer*)theTimer;
- (void)timerStartDrawHandBack:(NSTimer*)theTimer;
- (void)checkCurrentIsValid;
- (void)timerCheckCurrentIsValid:(NSTimer*)timer;
- (void)timerTransToResultView:(NSTimer*)timer;
- (void)timerPlayAgain:(NSTimer*)timer;
- (void)timerStartAI:(NSTimer*)timer;
- (void)timerAIProcess:(NSTimer*)timer;

@end
